<?php
header('Content-Type:text/html;charset=utf-8');
date_default_timezone_set('PRC');

// 开启除了错误提示
error_reporting(E_ALL ^ E_NOTICE);


//定义两个常量，root为物理地址根目录，http为域名根目录
define('ROOT', str_replace( "\\", "/", dirname(dirname(dirname(__FILE__)))) . '/' );
define('HTTP', str_replace( "\\", "/", $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . dirname(dirname($_SERVER['PHP_SELF']))) . '/' );

// 引入助手函数库
include_once 'lib/helper.php';
include_once 'lib/pagination.php';

$dblocahost = 'localhost';
$dbuser = 'root';
$dbpassword = 'root';
$dbname = 'blog';
$dbpre = 'b_';


// 链接数据库
$cn = connect( $dblocahost, $dbuser, $dbpassword, $dbname);



